<!DOCTYPE html>
<html lang="en" ng-app="UserInfoModule">

<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="css/bootstrap-3.0.0/css/bootstrap.css">
    <script type="text/javascript" src="js/angular-1.3.0.js"></script>
    <script type="text/javascript" src="Form.js"></script>
</head>

<body>
    <div class="panel panel-primary">
        <div class="panel-heading">
            <div class="panel-title">双向数据绑定</div>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-12">
                    <form ng-controller="UserInfoCtrl" role="form" class="form-horizontal">
                        <div class="form-group">
                            <label class="col-md-2 control-label">
                                邮箱：
                            </label>
                            <div class="col-md-10">
                                <input type="email" placeholder="推荐使用163邮箱" ng-model="userInfo.email" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">
                                密码：
                            </label>
                            <div class="col-md-10">
                                <input type="password" placeholder="只能使用字母、数字、下划线" ng-model="userInfo.password" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-10">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" ng-model="userInfo.autoLogin">自动登录
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                        	<div class="col-md-offset-2 col-md-10">
                        		<button class="btn btn-default" ng-click="getFormData()">
                        			获取form表单的值
                        		</button>
                        		<button class="btn btn-default" ng-click="setFormData()">
                        			设置form表单的值
                        		</button>
                        		<button class="btn btn-default" ng-click="resetForm()">
                        			重置表单
                        		</button>
                        	</div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
